using System.Runtime.InteropServices;

namespace WindowsAPI.COM
{
    [ComVisible(false), StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)]
    public struct SHCOLUMNINFO
    {
        public const int MAX_COLUMN_NAME_LEN = 80;
        public const int MAX_COLUMN_DESC_LEN = 128;

        public SHCOLUMNID scid; //SHCOLUMNID
        public ushort vt; //VARTYPE
        public LVCFMT fmt; //DWORD
        public uint cChars; //UINT
        public SHCOLSTATE csFlags;  //DWORD
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_COLUMN_NAME_LEN)]
        public string wszTitle; //WCHAR
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_COLUMN_DESC_LEN)]
        public string wszDescription; //WCHAR
    }
}